package pa165.dominating.species.service;

import java.util.*;
import pa165.dominating.species.enums.ElementType;
import pa165.dominating.species.tos.ElementTo;

/**
 *
 * @author Ondrej Prazak
 */
public interface ElementService {

    /**
     * creates element with specified attributes
     *
     * @param elementTo element to be created
     */
    public void createElement(ElementTo elementTo);

    /**
     * deletes specified element
     *
     * @param elementTo element to be deleted
     */
    public void deleteElement(ElementTo elementTo);

    /**
     * retrieves element with given id
     *
     * @param id id of an element we want to get
     */
    public ElementTo getElementToById(Long id);

    /**
     * retrieves all existing elementTos
     *
     * @return list of all elementTos
     */
    public List<ElementTo> getAllElementTos();

    /**
     * updates given elementTo
     *
     * @param elementTo to be updated
     */
    public void updateElementTo(ElementTo elementTo);
    
    
    /**
     * retrieves given element by its type
     * @param t type of an element
     * @return  returns an element with an appropriate type
     */
    public ElementTo getElementToByType(ElementType t);
}
